<?php echo $doctype; ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
  <title></title>
  
  <?php showTpl('meta'); ?>
 </head>
 <body>
  <?php showTpl('header'); ?>
  <div class="container">
   <?php showTpl('navigation'); ?>
   <div class="main">
<a href="<?php echo linkAt('view/fora') ?>"><?php echo $sitename; ?></a> -> <a href="<?php echo linkAt('view/thread', array('fid'=>$fid)) ?>"><?php echo $ftitle; ?></a> -> <?php echo $ttitle; ?> 
    <div class="content">
     <?php foreach( $posts as $post ): ?>
       <div class="postmeta"> 
         <img src="<?php echo $post['avatar'] ?>" alt="" />
         <h2>'<?php echo $post['title']; ?>' - <a href="<?php echo linkAt('view/user'); ?>" ><em><?php echo $post['uname']; ?></em></a><h2>
       </div>
       <?php start_smurfing() ?>
       <p><?php echo $post['datum']; ?></p>
       <?php end_smurfing($smurfkey) ?>
       <div class="postbar">
         <?php if( hasPerm('post.edit') || (hasPerm('post.edit.mine') && $_SESSION['uid'] == $post['uid'] ) ): ?>
           <a href="<?php echo linkAt('view/edit_post', array('pid'=>$post['id'])); ?>">edit</a>
         <?php endif; ?>
       </div>
     <?php endforeach; ?>
    </div>
   </div>
   <div class="clearer"><span></span></div>
   <?php if( $count > $psize ): ?>
     <?php showTpl('pagerBar'); ?>
   <?php endif; ?>
   <a href="<?php echo linkAt('view/new_post', array('tid'=>$tid, 'stream'=>$stream)); ?>" >New Post</a>
   <?php showTpl('footer'); ?>
  </div>
 </body>
</html>
